package com.zking.service.impl;


import com.zking.dao.domain.*;
import com.zking.dao.mapper.AsDoctorMapper;
import com.zking.service.AsDoctorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class AsDoctorServiceImpl implements AsDoctorService {

    @Autowired
    AsDoctorMapper asDoctorMapper;

    @Override
    public List<Doctor> showDoctor(int id) {
        return asDoctorMapper.showDoctor(id);
    }

    @Override
    public List<Doc_schedule> querySchedule(int did, List<String> list) {
        return asDoctorMapper.querySchedule(did,list);
    }

    @Override
    public Doc_schedule selectOrder(String time, int did) {
        return asDoctorMapper.selectOrder(time,did);
    }

    @Override
    public Doctor queryDoctor(int id) {
        return asDoctorMapper.queryDoctor(id);
    }

    @Override
    public Department queryDept(int deptid) {
        return asDoctorMapper.queryDept(deptid);
    }

    @Override
    public void updateSchedule(String time, String dname, String daytime) {
        asDoctorMapper.updateSchedule(time,dname,daytime);
    }

    @Override
    public int finishOrder(int d_id, int depet_id, int p_id, String create_time, String order_id) {
        return asDoctorMapper.finishOrder(d_id,depet_id,p_id,create_time,order_id);
    }

    @Override
    public void finishPay(String order_id) {
        asDoctorMapper.finishPay(order_id);
    }

    @Override
    public Patient queryPatientByPhone(String phone) {
        return asDoctorMapper.queryPatientByPhone(phone);
    }

    @Override
    public List<Register> queryRegister(int p_id) {
        return asDoctorMapper.queryRegister(p_id);
    }

    @Override
    public void insertPay(String time, double price) {
        asDoctorMapper.insertPay(time, price);
    }


}
